import request from '@/utils/request'

// 查询取衣柜列表
export function listCabinet(query) {
  return request({
    url: '/clothesCabinet/cabinet/list',
    method: 'get',
    params: query
  })
}

// 查询取衣柜详细
export function getCabinet(id) {
  return request({
    url: '/clothesCabinet/cabinet/' + id,
    method: 'get'
  })
}

// 新增取衣柜
export function addCabinet(data) {
  return request({
    url: '/clothesCabinet/cabinet/add',
    method: 'post',
    data: data
  })
}

// 修改取衣柜
export function updateCabinet(data) {
  return request({
    url: '/clothesCabinet/cabinet/edit',
    method: 'put',
    data: data
  })
}

// 删除取衣柜
export function delCabinet(id) {
  return request({
    url: '/clothesCabinet/cabinet/remove/' + id,
    method: 'delete'
  })
}

// 导出取衣柜
export function exportCabinet(query) {
  return request({
    url: '/clothesCabinet/cabinet/export',
    method: 'get',
    params: query
  })
}

// 取衣柜排序
export function orderByCabinet(id) {
  return request({
    url: '/clothesCabinet/cabinet/orderByCabinet/' + id,
    method: 'get'
  })
}
